using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ICItemMaterialMap : EntityTypeConfiguration<t_ICItemMaterial>
    {
        public t_ICItemMaterialMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNote)
                .HasMaxLength(80);

            this.Property(t => t.FABCCls)
                .IsFixedLength()
                .HasMaxLength(1);

            // Table & Column Mappings
            this.ToTable("t_ICItemMaterial");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FOrderRector).HasColumnName("FOrderRector");
            this.Property(t => t.FPOHghPrcMnyType).HasColumnName("FPOHghPrcMnyType");
            this.Property(t => t.FPOHighPrice).HasColumnName("FPOHighPrice");
            this.Property(t => t.FWWHghPrc).HasColumnName("FWWHghPrc");
            this.Property(t => t.FWWHghPrcMnyType).HasColumnName("FWWHghPrcMnyType");
            this.Property(t => t.FSOLowPrc).HasColumnName("FSOLowPrc");
            this.Property(t => t.FSOLowPrcMnyType).HasColumnName("FSOLowPrcMnyType");
            this.Property(t => t.FIsSale).HasColumnName("FIsSale");
            this.Property(t => t.FProfitRate).HasColumnName("FProfitRate");
            this.Property(t => t.FSalePrice).HasColumnName("FSalePrice");
            this.Property(t => t.FBatchManager).HasColumnName("FBatchManager");
            this.Property(t => t.FISKFPeriod).HasColumnName("FISKFPeriod");
            this.Property(t => t.FKFPeriod).HasColumnName("FKFPeriod");
            this.Property(t => t.FTrack).HasColumnName("FTrack");
            this.Property(t => t.FPlanPrice).HasColumnName("FPlanPrice");
            this.Property(t => t.FPriceDecimal).HasColumnName("FPriceDecimal");
            this.Property(t => t.FAcctID).HasColumnName("FAcctID");
            this.Property(t => t.FSaleAcctID).HasColumnName("FSaleAcctID");
            this.Property(t => t.FCostAcctID).HasColumnName("FCostAcctID");
            this.Property(t => t.FAPAcctID).HasColumnName("FAPAcctID");
            this.Property(t => t.FGoodSpec).HasColumnName("FGoodSpec");
            this.Property(t => t.FCostProject).HasColumnName("FCostProject");
            this.Property(t => t.FIsSnManage).HasColumnName("FIsSnManage");
            this.Property(t => t.FStockTime).HasColumnName("FStockTime");
            this.Property(t => t.FBookPlan).HasColumnName("FBookPlan");
            this.Property(t => t.FBeforeExpire).HasColumnName("FBeforeExpire");
            this.Property(t => t.FTaxRate).HasColumnName("FTaxRate");
            this.Property(t => t.FAdminAcctID).HasColumnName("FAdminAcctID");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FIsSpecialTax).HasColumnName("FIsSpecialTax");
            this.Property(t => t.FSOHighLimit).HasColumnName("FSOHighLimit");
            this.Property(t => t.FSOLowLimit).HasColumnName("FSOLowLimit");
            this.Property(t => t.FOIHighLimit).HasColumnName("FOIHighLimit");
            this.Property(t => t.FOILowLimit).HasColumnName("FOILowLimit");
            this.Property(t => t.FDaysPer).HasColumnName("FDaysPer");
            this.Property(t => t.FLastCheckDate).HasColumnName("FLastCheckDate");
            this.Property(t => t.FCheckCycle).HasColumnName("FCheckCycle");
            this.Property(t => t.FCheckCycUnit).HasColumnName("FCheckCycUnit");
            this.Property(t => t.FStockPrice).HasColumnName("FStockPrice");
            this.Property(t => t.FABCCls).HasColumnName("FABCCls");
            this.Property(t => t.FBatchQty).HasColumnName("FBatchQty");
            this.Property(t => t.FClass).HasColumnName("FClass");
            this.Property(t => t.FCostDiffRate).HasColumnName("FCostDiffRate");
            this.Property(t => t.FDepartment).HasColumnName("FDepartment");
            this.Property(t => t.FSaleTaxAcctID).HasColumnName("FSaleTaxAcctID");
            this.Property(t => t.FCBBmStandardID).HasColumnName("FCBBmStandardID");
        }
    }
}
